package a入门.day4.switchDemo;

import java.util.Scanner;

public class Test1 {
    public static void main1(String[] args) {
        int a=2;
        switch (a){
            case 1:
                System.out.println("a的值为1");
                //break;//跳出整个switch语句
            case 2:
                System.out.println("a的值为2");
                //break;
            default:
                System.out.println("跟所有的case不匹配，则走到此处");
        }
    }

    public static void main2(String[] args) {
        char c='C';
        switch (c){
            case 'A':
                System.out.println("优秀");
                break;
            case 'B':
                System.out.println("良好");
                break;
            case 'C':
                System.out.println("中");
                break;
            default:
                System.out.println("及格以后。。。");
        }
    }
    public static void main(String[] args) {
        System.out.println("请输入你要执行的模式：");
        Scanner in=new Scanner(System.in);
        String s=in.next();
        switch (s){
            case "开户":
                System.out.println("开户中....");
                break;
            case "查询":
                System.out.println("余额查询中...");
                break;
            case "转帐":
                System.out.println("转帐中...");
                break;
            default:
                System.out.println("退出系统中。。。");
        }
        int b=3;
        switch (b){

        }
    }
}
